#购前
money = 60
good_list = ['苹果','香蕉','梨']
good_price_list = [50,60,70]
good_car_list = []
#购中
good_want = input("您要购买什么商品？\n")
i=0
for i in range(3):
    good = good_list[i]
    price = good_price_list[i]
    if good_want in good_list and good_want == good:
         if money >= price:
            good_car_list.append(good)
            money -= price
            print("恭喜，购买成功！您的卡余额还剩",money,"元")
            break
         else :
            print("穷鬼，钱不够！请到其他超市购买！")
            break
    else:
        if good_want not in good_list:
            print("没有这个商品，别瞎弄！")
            break
#购后
shop_exit = input("输入q退出：")
if shop_exit == 'q':
    print("购物小条")

